//
//  Person.m
//  OC5_数组
//
//  Created by dllo on 15/10/28.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "Person.h"

@implementation Person


- (id)initWithName:(NSString *)name sex:(NSString *)sex age:(NSInteger)age
{
    self = [super init];
    if (self) {
        [self setName:name];
        [self setSex:sex];
        [self setAge:age];
    }
    return self;
}

+ (id)personWithName:(NSString *)name sex:(NSString *)sex age:(NSInteger)age
{
    Person *p = [[Person alloc] initWithName:name sex:sex age:age];
    return p;
}

- (void)info
{
    NSLog(@"%@ %@ %ld", [self name], [self sex], [self age]);
}







@end
